﻿
<div class="row">
    <div class="col-lg-12">
        <div class="ibox">

            <div class="ibox-content">
                <h2>
                    创建系统初始化数据
                </h2>

                <form id="initdata-wizard" action="#" class="wizard-big form-horizontal">
                    <h1>系统配置</h1>
                    <div class="row system-config">

                        <div class="form-group">
                            <label for="ApplicationName" class="col-md-3 control-label text-right">应用程序名称</label>
                            <div class="col-md-9">
                                <div class="input-group m-b text-left">
                                    <span class="input-group-addon">*</span>
                                    <input id="ApplicationName" name="ApplicationName" value="@ApplicationEnvironments.Site.ApplicationName" validate="{required:false,minlength:4,maxlength:16}" class="form-control" placeholder="应用程序名称不能为空" />
                                </div>
                                <span data-valmsg-for="ApplicationName" data-valmsg-replace="true" class="text-danger"></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="DBProviderType" class="col-md-3 control-label text-right">数据库类型</label>
                            <div class="col-md-9">
                                <div class="input-group m-b text-left">
                                    <span class="input-group-addon">*</span>
                                    <select name="DBProviderType" id="DBProviderType" class="select2 col-md-5">
                                        <option value="SqlServer">SqlServer</option>
                                        <option value="MySql">MySql</option>
                                    </select>
                                </div>
                                <span data-valmsg-for="ProviderType" data-valmsg-replace="true" class="text-danger"></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="ConnectionString" class="col-md-3 control-label text-right">数据库连接</label>
                            <div class="col-md-9">
                                <div class="input-group m-b text-left">
                                    <span class="input-group-addon">*</span>
                                    <input id="ConnectionString" name="ConnectionString" value="@ApplicationEnvironments.Site.ConnectionString" validate="{required:true}" class="form-control" placeholder="数据库连接" />
                                </div>
                                <span data-valmsg-for="ConnectionString" data-valmsg-replace="true" class="text-danger"></span>
                            </div>
                        </div>
                       
                        <div class="form-group">
                            <label for="ServerAddress" class="col-md-3 control-label text-right">服务器地址</label>
                            <div class="col-md-9">
                                <div class="input-group m-b text-left">
                                    <span class="input-group-addon">*</span>
                                    <input id="ServerAddress" name="ServerAddress" value="@ApplicationEnvironments.Site.ServerAddress" validate="{required:true,minlength:4,maxlength:16,stringEn:true}" class="form-control" placeholder="服务器地址" />
                                </div>
                                <span data-valmsg-for="ServerAddress" data-valmsg-replace="true" class="text-danger"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="plugs" class="col-md-3 control-label text-right">需要初始化的模块</label>
                            <div class="col-md-9  text-left">
                                <textarea id="plugs" name="plugs" class="form-control" validate="{required:true   }" rows="10">
@if (ApplicationEnvironments.Site.Components.Plug != null && ApplicationEnvironments.Site.Components.Plug.Count > 0)
{
    string strBll = "";
    foreach (var item in ApplicationEnvironments.Site.Components.Plug)
    {
        if (item.Service != null && item.Service.Length > 0)
        {
            if (!string.IsNullOrWhiteSpace(strBll))
            {
                strBll += ",";
            }
            strBll += string.Join(',', item.Service);
        }
    }
    @Html.Raw(strBll.Trim())
}
</textarea>
                                <span data-valmsg-for="plugs" data-valmsg-replace="true" class="text-danger"></span>
                            </div>
                        </div>
                    </div>
                    <h1>生成初始化数据</h1>
                    <div class="row initdata-result">
                    </div>

                </form>
            </div>
        </div>
    </div>


</div>
@section scripts{

    <script type="text/javascript">


    </script>
}
